let Config = require('./Config');

DeviceModule = function(){

}

DeviceModule.prototype.test = function(){
    console.log('------------test');
}

DeviceModule.prototype.handleChangeDevice = function(data){
    // "/data/data/org.lsposed.manager/files/SimulateDevice.json"
    files.write(Config.DeviceConfigPath,JSON.stringify(data));
}

DeviceModule.prototype.getCurrentDeviceInfo = function(){
    if(!files.exists(Config.DeviceConfigPath)){
        return null;
    }
    let str = files.read(Config.DeviceConfigPath);
    return str;
}

module.exports = DeviceModule;